<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link href="./videojs/video-js.min.css" rel="stylesheet">
    <script src="./videojs/video.min.js"></script>

    <link rel="stylesheet" href="./css/globle.css">
    <link rel="stylesheet" href="./css/index.css">
</head>

<body>
    <video id="my-player" class="video-js" controls preload="auto" poster="//vjs.zencdn.net/v/oceans.png"
        data-setup='{}'>
        <source src="//vjs.zencdn.net/v/oceans.mp4" type="video/mp4">
        </source>
        <source src="//vjs.zencdn.net/v/oceans.webm" type="video/webm">
        </source>
        <source src="//vjs.zencdn.net/v/oceans.ogv" type="video/ogg">
        </source>
        <p class="vjs-no-js">
            To view this video please enable JavaScript, and consider upgrading to a
            web browser that
            <a href="https://videojs.com/html5-video-support/" target="_blank">
                supports HTML5 video
            </a>
        </p>
    </video>
    <button onclick="player.play()" style="position:fixed;top: 0;left:0;color: red">播放</button>
</body>

</html>

<script>
    var options = {
        controls: false,
        width: window.innerWidth,
        height: window.innerHeight,
        "isFullscreen":true
    };
    var player = videojs('my-player', options, function onPlayerReady() {
        videojs.log('Your player is ready!');

        // In this context, `this` is the player that was created by Video.js.
        this.play();

        // How about an event listener?
        this.on('ended', function () {
            videojs.log('Awww...over so soon?!');
        });
    });

</script>